<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>
	<link href="style/authority/basic_layout.css" rel="stylesheet" type="text/css">
	<link href="style/authority/common_style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="scripts/authority/commonAll.js"></script>
	<script type="text/javascript" src="scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
	<script type="text/javascript" src="scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
	<script type="text/javascript" src="scripts/artDialog/artDialog.js?skin=default"></script>
    
    
    <title>退货管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
		function changetoquery()
		{
			document.form1.action="servlet/Returngoodsservlet?type=query";
			document.form1.submit();
		}
		function changetoreturn()
		{
			document.form1.action="servlet/Returngoodsservlet?type=return";
			document.form1.submit();
		}
	</script>
  </head>
  
  <body>
  	<form name="form1" id="form1" method="post" >
  	<div id="container">	
		<div class="ui_content">
				<div class="ui_text_indent">
					<div id="box_border">
						<div id="box_top">查询</div>
						<div id="box_center" >
							供应商<input class="ui_input_txt02" name="supplier" type="text"/>
							商品ID<input class="ui_input_txt02" name="product_id" type="text"/>
						</div>
						<div id="box_bottom">
							<input type="button" class="ui_input_btn01" value="查询" onclick="changetoquery()"/>
						</div>
					</div>
				</div>
			</div>		
			<div class="ui_content">
				<div class="ui_tb">
			  		<table class="table" width="100%" align="center">
			  			<tr>
			  				<th>选择项</th>
			  				<th>供应商</th>
			  				<th>商品ID</th>
			  				<th>商品名称</th>
			  				<th>进货数量</th>
			  				<th>库存量</th>
			  				<th>库存类型</th>
			  				<th>退货数量</th>
			  			</tr>
			  			<c:forEach items="${products}" var="temp">
			  			<tr>
			  				<td><input type="checkbox" name="returngoods" value="${temp.product_id}"/></td>
			  				<td>${temp.supplier_name}</td>
			  				<td>${temp.product_id}</td>
			  				<td>${temp.product_name}</td>
			  				<td>${temp.lessnumber}</td>
			  				<td>${temp.nownumber}</td>
			  				<td>${temp.save_type}</td>
			  				<td><input class="ui_input_txt02" type="text" name="${temp.product_id}"/></td>
			  			</tr>  			
			  			</c:forEach>
			  			<tr><td colspan="8" align="center"><input type="button" class="ui_input_btn01" value="退货" onclick="changetoreturn()"/></td></tr>
			  		</table>
			  	</div>
			</div>
		</div>
  	</form>
  </body>
</html>
